﻿@model Core_Product
@{
    ViewBag.ParentUrl = "/Product/Index";
    ViewBag.Title = "编辑产品";
}
@section header{
    <style>
        .profile-info-name {
            width: auto;
        }
    </style>
}
@section breadcrumb
{
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a href="/">首页</a>
        </li>
        <li class="active">@ViewBag.Title</li>
    </ul><!-- .breadcrumb -->
}

<div class="row">
    <div class="col-xs-12">
        <form action="/Product/Edit" method="post">
            <div class="widget-box">
                <div class="widget-header widget-header-flat">
                    <h4 class="smaller">
                        <i class="icon-search"></i>
                        @ViewBag.Title
                    </h4>
                </div>
                @Html.HiddenFor(o=>o.P_Id)
                <div class="widget-body">
                    <div class="widget-main">

                        <div class="profile-user-info profile-user-info-striped">
                            <div class="profile-info-row">
                                <div class="profile-info-name"> 所属公司： </div>

                                <div class="profile-info-value">
                                    @Html.DropDownList("Company", (IEnumerable<SelectListItem>)TempData["CompanyList"], new { @class = "col-xs-12 col-sm-3", style = "width: 360px;" })
                                </div>
                            </div>

                            <div class="profile-info-row">
                                <div class="profile-info-name"> 产品名称： </div>

                                <div class="profile-info-value">
                                    @Html.TextBoxFor(o => o.P_Name, new { @class = "input-large", placeholder = "产品名称" })
                                </div>
                            </div>

                            <div class="profile-info-row">
                                <div class="profile-info-name"> 产品代码： </div>

                                <div class="profile-info-value">
                                    @Html.TextBoxFor(o => o.P_Code, new { @class = "input-large", placeholder = "产品代码" })
                                </div>
                            </div>

                            <div class="profile-info-row">
                                <div class="profile-info-name">打印功能：</div>

                                <div class="profile-info-value">

                                    <label class="inline">
                                        <input name="printFlag" type="checkbox" class="ace" value="1" @string.Format("{0}",Model.P_PrintTicket == 1?"checked='checked'":"")  />
                                        <span class="lbl middle"> 单证印刷号</span>
                                    </label>

                                    &nbsp; &nbsp; &nbsp;
                                    <label class="inline">
                                        <input name="printFlag" type="checkbox" class="ace" value="0" @string.Format("{0}",Model.P_PrintAfter == 1?"checked='checked'":"") />
                                        <span class="lbl middle"> 投保后打印</span>
                                    </label>
                                </div>
                            </div>

                            <div class="profile-info-row">
                                <div class="profile-info-name">收费方式：</div>

                                <div class="profile-info-value">

                                    <label class="inline">
                                        <input name="P_PriceType" type="radio" class="ace" value="0"  @string.Format("{0}",Model.P_PriceType == 0?"checked='checked'":"")/>
                                        <span class="lbl middle"> 次数</span>
                                    </label>

                                    &nbsp; &nbsp; &nbsp;
                                    <label class="inline">
                                        <input name="P_PriceType" type="radio" class="ace" value="1"  @string.Format("{0}",Model.P_PriceType == 1?"checked='checked'":"")  />
                                        <span class="lbl middle"> 价格</span>
                                    </label>
                                </div>
                            </div>


                            <div class="profile-info-row">
                                <div class="profile-info-name"> 保险期限： </div>

                                <div class="profile-info-value">
                                    @Html.TextBoxFor(o => o.P_Timeout, new { @class = "input-small", type = "number", placeholder = "期限" })
                                        <label class="inline">
                                            <span class="lbl">天 | </span>
                                        </label>
                                        <label class="inline">
                                            <span class="lbl">保险类型:</span>
                                        </label>
                                        <select class="form-control" id="P_PolicyType" name="P_PolicyType">
                                            <option>航意险</option>、
                                            <option>境内旅意险</option>
                                            <option>境外旅意险</option>
                                        </select>
                                </div>
                            </div>


                            <div class="profile-info-row">
                                <div class="profile-info-name"> 旅意险专用：</div>

                                <div class="profile-info-value">
                                    <label class="inline">
                                        <span class="lbl">保费： </span>
                                    </label>
                                    @Html.TextBoxFor(o => o.P_PolicyPrice, new { @class = "input-small", type = "number", placeholder = "保费" })
                                    <label class="inline">
                                        <span class="lbl">保险期间： </span>
                                    </label>
                                    @Html.TextBoxFor(o => o.P_PolicyTime, new { @class = "input-small", type = "number", placeholder = "保险期间" })
                                    <code>只针对旅游险显示使用</code>
                                </div>
                            </div>
                            <div class="profile-info-row">
                                <div class="profile-info-name"> 产品模板(打印)：</div>

                                <div class="profile-info-value">
                                    @Html.TextAreaFor(o=>o.P_PrintTemplate, new { rows=5,cols=68, placeholder = "产品模板(打印)" })
                                    
                                </div>
                            </div>

                            <div class="profile-info-row">
                                <div class="profile-info-name"> 产品说明：</div>

                                <div class="profile-info-value">
                                    @Html.TextAreaFor(o => o.P_Memo, new { rows = 5, cols = 68, placeholder = "产品模板(打印)" })
                                </div>
                            </div>


                            <div class="profile-info-row">
                                <div class="profile-info-name"> 产品详细： </div>

                                <div class="profile-info-value">
                                    <textarea id="P_Content" name="P_Content">@Model.P_Content</textarea>
                                </div>
                            </div>


                        </div>

                        <div class="space-4"></div>

                        <div class="clearfix form-actions">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="submit" id="btnSubmit">
                                    <i class="ace-icon fa fa-check bigger-110"></i>
                                    保存
                                </button>

                                &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="ace-icon fa fa-undo bigger-110"></i>
                                    重置
                                </button>
                            </div>
                        </div>
                        <div class="hr hr-24"></div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

@section footerScript
{
    <!--富文本编辑器  配置文件 -->
    <script type="text/javascript" src="/assets/js/editor/xheditor.min.js"></script>
    <script type="text/javascript" src="/assets/js/editor/xheditor_lang/zh-cn.js"></script> 
}

@section footer
{
    <script>
        $('#P_Content').xheditor({
            tools: 'full',
            width: '98%',
            height: '320px',
            upImgUrl: '/Editor/UploadFile',
            upImgExt: 'jpg,jpeg,gif,png'
        });
        $('#P_Memo').xheditor({
            tools: 'full',
            width: '98%',
            height: '320px',
            upImgUrl: '/Editor/UploadFile',
            upImgExt: 'jpg,jpeg,gif,png'
        });
    </script>
}
